<template>
  <div v-if="data">
      <div class="x-newslist">
        <div class="lists" v-for="item in data.data" :key="item.id">
          <p class="list-title">{{item.title}}</p>
          <p class="list-time">{{moment.unix(item.data).format('YYYY年MM月DD日')}}</p>
        </div>
      </div>
  </div>
</template>

<script>
  export default {
    props:['data'],
  }
</script>

<style lang="scss" scoped>
.x-newslist{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 1180px;
  margin:20px auto 0;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
  .lists{
    width: 590px;
    .list-title{
      margin: 15px 0 ;
      color: #333333;
      font-size: 16px;
    }
    .list-time{
      margin: 6px 0 ;
      font-size: 14px;
      color: #909090;
    }
  }
}
</style>